Login and get codingIn this Bite, we want you to scrape PyCon 2019 data.
The provided source via
_get_pycon_data
contains data for years other than 2019 and conferences other than PyCon, so you have to be selective.Complete the
get_pycon_events
function by scraping the required data from the source. The data is contained in aapplication/ld+json
data structure, which can be parsed with the json module after retrieving the content. Extract the data required for the given PyConnamedtuple
which is the name of the PyCon, the city it takes place, the country the start date, the end date and the homepage url. Make sure to parse the start date and the end date asdatetime
.After retrieving all PyCon events complete the
filter_pycons
function. The function takes a list of PyConnamedtumple
s, a year and a continent as parameters. Based on the year and continent, return a list of all PyCons that meet the requirements. To make it a bit easier for you, we provide aget_continent(country)
function which takes a country name as a string and returns the continent of the country as a string.Check the tests and docstrings for additional information.
Good luck and keep calm and code in Python!
92 out of 97 users completed this Bite.
Will you be the 93rd person to crack this Bite?
Resolution time: ~93 min. (avg. submissions of 5-240 min.)
Our community rates this Bite 5.0 on a 1-10 difficulty scale.
» Up for a challenge? 💪